<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
    <style>
        .active {
            background-color: pink;
        }
    </style>
</head>

<body>
    <!-- 视图层 -->
    <div id="app">
        <!-- 动态绑定style -->
        <div ：style="styleObj">块级元素</div>
        <!-- 动态绑定class -->
        <p :class="{active:}">段落标签</p>
    </div>
    <script>
        new Vue({
            el: '#app',
            // 存放vue变量
            data: {
                isActive: true,
                styleObj: {
                    width: '100px',
                    height: '100px',
                    backgroundColor: 'red',
                    color: 'white',
                }
            },
            //存放方法函数
            methods: {

            },
        })
    </script>
</body>

</html>